package com.lovo.pis.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lovo.pis.dto.BuyOrderBean;
import com.lovo.pis.dto.PageBean;
import com.lovo.pis.dto.SellOrderBean;
import com.lovo.pis.mapper.SellOrderMapper;
import com.lovo.pis.service.IBuyOrderService;
import com.lovo.pis.service.ISellOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sellOrder")
public class SellOrderController {

    @Autowired
    ISellOrderService sellOrderService;
    //模糊分页查询所有
    @RequestMapping("/queryAll")
    public IPage<SellOrderBean> queryAllBuyOrder(@RequestBody PageBean<SellOrderBean> pageInfo){
       return sellOrderService.queryAllBuyCarGoods(pageInfo);
    }
    //id查询详情
    @RequestMapping("/query")
    public SellOrderBean queryById(int id){
        SellOrderBean sellOrderBean = sellOrderService.queryById(id);
       return sellOrderService.queryById(id);
    }

}
